package hlhj.fhp.checkpoint.adp

import com.chad.library.adapter.base.BaseQuickAdapter
import com.chad.library.adapter.base.BaseViewHolder
import hlhj.fhp.checkpoint.R
import hlhj.fhp.checkpoint.atys.ReportCenterAty
import hlhj.fhp.checkpoint.javaBean.ProblemBean
import hlhj.fhp.checkpoint.javaBean.ReportCenterBean

/**
 * Created by Never Fear   on 2018\11\22 0022.
Never More....
 *@param type 0未回复 1已回复
 */
class ReportAdp(private val datas:ArrayList<ReportCenterBean.InfoBean.ListBean.DataBean>)
    : BaseQuickAdapter<ReportCenterBean.InfoBean.ListBean.DataBean, BaseViewHolder>(R.layout.problem_item,datas) {
    override fun convert(helper: BaseViewHolder?, item: ReportCenterBean.InfoBean.ListBean.DataBean?) {
        helper?.setText(R.id.itemTv,"Q${helper?.adapterPosition+1}")
        helper?.setText(R.id.itemQuestion,item?.advice)
        helper?.setText(R.id.itemAnwser,item?.reply)
        if (ReportCenterAty.type==0){
            helper?.setVisible(R.id.itemAnwser,false)
            helper?.setVisible(R.id.itemTv2,false)
        }else{
            helper?.setVisible(R.id.itemAnwser,true)
            helper?.setVisible(R.id.itemTv2,true)
        }
    }
}